<include file="__PUBLIC__/header"/>
<div class="page-container">
    <form class="form form-horizontal" id="form" method="post" action="{|U:'add'}">
        <input type="hidden" name="type" value="custom"/>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>标题（中文）：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" value="" placeholder="请填写标题" name="title" datatype="*" nullmsg="请填写标题" />
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>变量名(英文)：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" value="" placeholder="请填写变量名" name="name" datatype="*" nullmsg="请填写变量名" />
            </div>
            <div class="col-xs-3 col-sm-3">大写英文字母</div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">提示信息：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <textarea class="textarea" placeholder="请填写提示信息" name="message" onkeyup="textarealength(this,100)"></textarea>
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">显示方法：</label>
            <div class="formControls col-xs-6 col-sm-6 skin-minimal">
                <div class="radio-box">
                    <input type="radio" name="show_type" id="show_type1" value="text" />
                    <label for="show_type1">text</label>
                </div>
                <div class="radio-box">
                    <input type="radio" name="show_type" id="show_type2" value="radio"/>
                    <label for="show_type2">radio</label>
                </div>
                <div class="radio-box">
                    <input type="radio" name="show_type" id="show_type3" value="textarea"/>
                    <label for="show_type3">textarea</label>
                </div>
                <div class="radio-box">
                    <input type="radio" name="show_type" id="show_type4" value="select"/>
                    <label for="show_type4">select</label>
                </div>
            </div>
            <div class="col-xs-3 col-sm-3"> </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">配置值：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" value="" name="value" datatype="*" nullmsg="请填写配置值"/>
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">参数（对radio与select有效)：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <textarea class="textarea" placeholder="请填写提示信息" name="info" onkeyup="textarealength(this,100)"></textarea>
            </div>
            <div class="col-xs-3 col-sm-3">如：1|开启,0|关闭</div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">配置组：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <div class="select-box">
                    <select name="cgid" class="select">
                        <list from="$configGroup" name="$q">
                            <option value="{$q.id}">{$q.title}</option>
                        </list>
                        </list>
                    </select>
                </div>
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>

        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <button type="submit" class="btn btn-primary radius"><i class="iconfont icon-duigou1"></i> 提交</button>
                <button type="button" class="btn btn-default radius ml-20" onClick="layer_close();">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
            </div>
        </div>
    </form>
</div>
<include file="__PUBLIC__/footer"/>
<script>
    $(function () {
        //默认选中
        $("[name='show_type'][value='text']").attr("checked",true);
        $("[name='type']").find("[value='1']").attr("selected",true);
        //单选框样式
        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });
        $("#form").Validform({
            tiptype:2,
            ajaxPost:true,
            showAllError:true,
            callback:function(ret){
                ajax_progress(ret);

            }
        });
    })
</script>
</body>
</html>